/**
 * @author：anlzou
 * @Date：Created in7:29 2021/4/9
 * @Github：https://github.com/anlzou
 * @Description：
 */
package com.anlzou.Transformation;

/**
 * 父类
 */
public class Father {
    private final String name = "Father";
    //睡觉方法
    public void sleep() {
        System.out.println(name + "睡觉");
    }
}

/**
 * 子类
 *
 * 继承Father类
 */
class Son extends Father{
    private final String name = "Son";
    //调皮方法
    public void p() {
        System.out.println(name + "调皮");
    }
}
